package com.heima.user.controllerv1;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.ApUserDto;
import com.heima.user.service.ApUserAuthService;
import lombok.extern.slf4j.Slf4j;
import org.bouncycastle.cert.ocsp.Req;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户审核相关接口
 */
@RestController
@Slf4j
@RequestMapping("/api/v1/auth")
public class ApUserAuthController {

    @Autowired
    private ApUserAuthService apUserAuthService;

    @PostMapping("/list")
    public ResponseResult list(@RequestBody ApUserDto dto){
        return apUserAuthService.listUser(dto);
    }

    @PostMapping("/authFail")
    public ResponseResult authFail(@RequestBody ApUserDto dto){
        return apUserAuthService.authFail(dto);
    }

    @PostMapping("/authPass")
    public ResponseResult authPass(@RequestBody ApUserDto dto){
        return apUserAuthService.authPass(dto);
    }

}
